#ifndef __RobotFactoryI_H__
#define __RobotFactoryI_H__

#include <Robots.h>
#include <RobotI.h>

#include <Ice/Ice.h>
#include <IceUtil/Mutex.h>
#include <map>

using namespace std;

class RobotFactoryI: public Robots::RobotFactory
{
 public:
  RobotFactoryI();
  ~RobotFactoryI();

  virtual Robots::RobotSeq create
    (const Ice::StringSeq&,
     const Ice::Current&);

  virtual Robots::RobotSeq list
    (const Ice::Current&);

 private:
  IceUtil::Mutex _m;
  typedef std::map
    <string, RobotIPtr>
    RMap;
  mutable RMap _robots;
};

typedef IceUtil::Handle<RobotFactoryI> RobotFactoryIPtr;

#endif
